package com.zhentao.controller;

import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.service.ChargeUserFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @ClassName: ChargeUserFileController
 * @Author: 振涛教育_Q
 * @Date: 2024/12/22 12:16
 */
@RestController
@RequestMapping("/auth/user")
public class ChargeUserFileController {

    @Autowired
    private ChargeUserFileService fileService;
    /**
     * @description  用户头像处理
     * @author 振涛教育_小Q
     * @date    2024/12/22 12:17
      * @param file
     * @return com.zhentao.model.common.dtos.ResponseResult
     */
    @PostMapping("/file/uploadAvatarImg")
    public ResponseResult uploadAvatarImg(@RequestBody MultipartFile file){
        return fileService.uploadAvatarImg(file);
    }
}
